package com.cardone.platform.usercenter.service;

import java.util.List;

import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.transaction.annotation.Transactional;

import com.cardone.common.cache.Caches;
import com.cardone.common.dto.PaginationDto;
import com.cardone.platform.usercenter.dto.UsDepartmentTranslateDto;

/**
 * 用户部门调动服务
 *
 * @author yaohaitao
 */
public interface UsDepartmentTranslateService {
	/**
	 * spring bean id
	 */
	String BEAN_ID = "com.cardone.platform.usercenter.service.UsDepartmentTranslateService";

	/**
	 * 保存:用户部门调动
	 *
	 * @param mappedClass
	 *          返回类型
	 *
	 * @param saveUsDepartmentTranslate
	 *          用户部门调动对象
	 *
	 * @return 用户部门调动对象
	 */
	@Deprecated
	@Transactional
	@CacheEvict(value = UsDepartmentTranslateService.BEAN_ID, allEntries = true)
	<P> P saveByIdOrCode(final Class<P> mappedClass, final UsDepartmentTranslateDto saveUsDepartmentTranslate);

	/**
	 * 插入
	 *
	 * @param insertUsDepartmentTranslate
	 *          用户部门调动对象
	 *
	 * @return 影响行数
	 */
	@Deprecated
	@Transactional
	@CacheEvict(value = UsDepartmentTranslateService.BEAN_ID, allEntries = true)
	int insertByCode(final UsDepartmentTranslateDto insertUsDepartmentTranslate);

	/**
	 * 删除
	 *
	 * @param deleteUsDepartmentTranslate
	 *          用户部门调动对象
	 *
	 * @return 影响行数
	 */
	@Deprecated
	@Transactional
	@CacheEvict(value = UsDepartmentTranslateService.BEAN_ID, allEntries = true)
	int deleteByIds(final UsDepartmentTranslateDto deleteUsDepartmentTranslate);

	/**
	 * 更新
	 *
	 * @param updateUsDepartmentTranslate
	 *          用户部门调动对象
	 *
	 * @return 影响行数
	 */
	@Deprecated
	@Transactional
	@CacheEvict(value = UsDepartmentTranslateService.BEAN_ID, allEntries = true)
	int updateByCode(final UsDepartmentTranslateDto updateUsDepartmentTranslate);

	/**
	 * 查询
	 *
	 * @param readUsDepartmentTranslate
	 *          用户部门调动对象
	 * @return 返回数据
	 */
	@Deprecated
	@Cacheable(value = UsDepartmentTranslateService.BEAN_ID, key = Caches.KEY_1)
	Integer readByCodeNqIdForCount(final UsDepartmentTranslateDto readUsDepartmentTranslate);

	/**
	 * 查询
	 *
	 * @param mappedClass
	 *          返回类型
	 *
	 * @param findUsDepartmentTranslate
	 *          用户部门调动对象
	 * @return 返回对象
	 */
	@Deprecated
	@Cacheable(value = UsDepartmentTranslateService.BEAN_ID, key = Caches.KEY_2)
	<P> P findById(final Class<P> mappedClass, final UsDepartmentTranslateDto findUsDepartmentTranslate);

	/**
	 * 查询
	 *
	 * @param mappedClass
	 *          返回类型
	 *
	 * @param findUsDepartmentTranslate
	 *          用户部门调动对象
	 *
	 * @return 返回对象
	 */
	@Deprecated
	@Cacheable(value = UsDepartmentTranslateService.BEAN_ID, key = Caches.KEY_2)
	<P> P findByCodeOrId(final Class<P> mappedClass, final UsDepartmentTranslateDto findUsDepartmentTranslate);

	/**
	 * 查询
	 *
	 * @param mappedClass
	 *          返回类型
	 *
	 * @param findListUsDepartmentTranslate
	 *          用户部门调动对象
	 *
	 * @return 用户部门调动对象集合
	 */
	@Deprecated
	@Cacheable(value = UsDepartmentTranslateService.BEAN_ID, key = Caches.KEY_2)
	<P> List<P> findListByLikeCode(final Class<P> mappedClass, final UsDepartmentTranslateDto findListUsDepartmentTranslate);

	/**
	 * 分页
	 *
	 * @param mappedClass
	 *          返回类型
	 *
	 * @param paginationUsDepartmentTranslate
	 *          用户部门调动对象
	 *
	 * @return 用户部门调动分页对象
	 */
	@Deprecated
	@Cacheable(value = UsDepartmentTranslateService.BEAN_ID, key = Caches.KEY_2)
	<P> PaginationDto<P> paginationByLikeCode(final Class<P> mappedClass, final UsDepartmentTranslateDto paginationUsDepartmentTranslate);
}